<!DOCTYPE html>
<html lang="en"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets" 
>
    <h:body>
 
    	<ui:composition template="../Template/template.xhtml">
    		<ui:define name="content">
    			<f:metadata>
    				<f:event type="preRenderView" listener="#{ViewChatManagedProjectsBean.initView}"/>
				</f:metadata>
    			<section id="content">
	    			<h2> Conversations du projet : <h:outputText value="#{ViewChatManagedProjectsBean.currentProject.prjLabel}"/> </h2>
	    			<p>
	    				Consulter les conversations des paticipants dans le cadre du projet : <h:outputText value="#{ViewChatManagedProjectsBean.currentProject.prjLabel}"/>
	    			</p>
	    			<div class="tab">
        				<ul>
            				<li>
            					<a href="#tabs-1">Conversations actives</a>
            				</li>
        				</ul>
        				<div id="tabs-1" style="margin:10px;">
        					<h:dataTable rendered="#{!empty ViewChatManagedProjectsBean.chatUsers}" value="#{ViewChatManagedProjectsBean.chatUsers}" var="p" class="datatable">
								<h:column>
									<f:facet name="header">Nom</f:facet>
									<h:outputText value="#{p.usrLastname}" />
								</h:column>
								<h:column>
									<f:facet name="header">Prénom</f:facet>
									<h:outputText value="#{p.usrFirstname}" />
								</h:column>
								<h:column>
									<f:facet name="header">Nom d'utilisateur</f:facet>
									<h:outputText value="#{p.usrLogin}" />
								</h:column>
								<h:column>
									<f:facet name="header">Actions</f:facet>
									<h:form>
										<h:link outcome="ListeConversations" value="Voir les conversations" styleClass="btn small">
											<f:param name="usrChatterId" id="usrChatterId" value="#{p.usrId}" />
											<f:param name="prjId" id="prjId" value="#{ViewChatManagedProjectsBean.currentProject.prjId}" />
										</h:link>
									</h:form>
								</h:column>
							</h:dataTable>
        				</div>
        			</div>
				</section>
    		</ui:define>
    	</ui:composition>    	
    </h:body>
 
</html>